<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" href="$gqt/admin/bootstrap2.3.2/css/bootstrap.min.css">
    <!-- <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">   -->
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <!--  <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script> -->
    <script src="/GQT/public/static/admin/bootstrap2.3.2/js/bootstrap.min.js"></script>
    <!-- <script src="/GQT/public/static/admin/bootstrap2.3.2/js/jquery-1.9.1.min.js"></script> -->

    <title>用户管理</title>
</head>
<style type="text/css">
    thead>tr,
    tbody>tr {
        background: #c9e6f6;
        color: #000;
    }
</style>

<body>
    <div class="page-container">
        <div class="cl pd-5 bg-1 bk-gray mt-20">
            <span class="r">共有数据：
                <strong>{$count}</strong> 条</span>
            <span class="l">
                <a class="" data-toggle="modal" data-target="#myModal"> <img src='$gqt/admin/image/adduser.png'></a>
            </span>
            <!-- 模态框（Modal）开始 -->
            <div class="modal  fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog modal-sm" id="myModaldialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                &times;
                            </button>
                            <h4 class="modal-title" id="myModalLabel">
                                用户信息：
                            </h4>
                        </div>
                        <div class="modal-body">
                            <form method="post" action="/GQT/public/admin/index/insert">
                                <span>学号：</span>
                                <input type="text" required="required" placeholder="学号" name="stu_id" value=""
                                />
                                <br />
                                <span>密码：</span>
                                <input type="text" required="required" placeholder="密码" name="password" value=""
                                />
                                <br />
                                <span>姓名：</span>
                                <input type="text" required="required" placeholder="姓名" name="name" value="" />
                                <br />
                                <span>班级：</span>
                                <input type="text" placeholder="班级" name="class" value="" />
                                <br/>
                                <span>性别：</span>
                                <input type="select" placeholder="性别" name="sex" value="" />
                                <br/>
                                <span>年级：</span>
                                <input type="select" placeholder="年级" name="grade" value="" />
                                <br/>
                                <span>系别：</span>
                                <input type="dept" placeholder="系别" name="grade" value="" />
                                <br/>
                                <span>专业：</span>
                                <input type="major" placeholder="专业" name="grade" value="" />
                                <br/>
                                <!-- <span>学分：</span>
                                <input type="select" placeholder="学分" name="score" value="" />
                                <br/> -->
                                <button class="but" type="submit">提交</button>
                            </form>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        </div>
                    </div>
                    <!-- /.modal-content -->
                </div>
                <!-- /.modal -->
            </div>
            <!--结束-->
            <div style="display:inline-flex">
                <form action="{:url('admin/Excel/savestudentImport')}" enctype="multipart/form-data" method="post" style="display:inline-flex">
                <input type="file" name="excel"  accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" /><input type="submit" value="导入excel"/>   
            </div>

    </form>
         <!--   <span class="l">
                <a  href=""> <img src='$gqt/admin/image/import.png'></a>
            </span> -->
        </div>
        <div class="mt-20">
            <table class="table table-hover" id="cusTable" data-pagination="true" data-show-refresh="true" data-show-toggle="true" data-showColumns="true">
                <thead>
                    <tr>
                        
                        <th data-field="stu_id" data-sortable="true" >
                             学号
                        </th>
                        <th data-field="password" data-sortable="true" >
                            密码
                        </th>
                        <th data-field="name" data-sortable="true" >
                            姓名
                        </th>
                        <th data-field="clss" data-sortable="true">班级</th>
                        <th data-field="sex" data-sortable="true" >性别</th>
                        <th data-field="grade" data-sortable="true">年级</th>
                        <th data-field="dept" data-sortable="true">系别</th>
                         <th data-field="major" data-sortable="true">专业</th>
                        <th data-field="chang" data-sortable="true" >
                            是否修改
                        </th>
                        <th data-field="chang" data-sortable="true" >
                            是否删除
                        </th>


                    </tr>
                </thead>
                <tbody>
                    {volist name="list->data" id="vo"}
                    <tr>
                        <td>{$vo.stu_id}</td>
                        <td>{$vo.password}</td>
                        <td>{$vo.name}</td>
                        <td>{$vo.class}</td>
                        <td>{$vo.sex}</td>
                        <td>{$vo.grade}</td>
                        <td>{$vo.dept}</td>
                        <td>{$vo.major}</td>
                        <td>
                            <a class="" data-toggle="modal" data-target="#{$vo.stu_id}" id="change"><img src='$gqt/admin/image/change.png'></a>
                        </td>
                        <!-- 模态框（Modal）开始 -->
                        <div class="modal  fade" id="{$vo.stu_id}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog modal-sm" id="myModaldialog">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                            &times;
                                        </button>
                                        <h4 class="modal-title" id="myModalLabel">
                                            用户信息：
                                        </h4>
                                    </div>
                                    <div class="modal-body">
                                        <form method="post" action="/GQT/public/admin/index/update?id={$vo.stu_id}">
                                            <span>账号：</span>
                                            <input type="text" required="required" placeholder="学号" name="stu_id"
                                                value="{$vo.stu_id}"  readonly = "readonly" />
                                            <br />
                                            <span>密码：</span>
                                            <input type="text" required="required" placeholder="密码" name="password"
                                                value="{$vo.password}" />
                                            <br />
                                            <span>姓名：</span>
                                            <input type="text" required="required" placeholder="姓名" name="name"
                                                value="{$vo.name}" />
                                            <br />
                                            <span>班级：</span>
                                            <input type="text" placeholder="class" name="class" value="{$vo.class}"
                                            />
                                            <br/>
                                            <span>性别：</span>
                                            <input type="text" placeholder="sex" name="sex" value="{$vo.sex}" />
                                            <br/>
                                            <span>年级：</span>
                                            <input type="text" placeholder="grade" name="grade" value="{$vo.grade}" />
                                            <br/>
                                            <span>系别：</span>
                                            <input type="text" placeholder="dept" name="dept" value="{$vo.dept}" />
                                            <br/>
                                            <span>专业：</span>
                                            <input type="text" placeholder="major" name="major" value="{$vo.major}" />
                                            <br/>
                                            <button class="but" type="submit">提交</button>
                                        </form>
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                    </div>
                                </div>
                                <!-- /.modal-content -->
                            </div>
                            <!-- /.modal -->
                        </div>
                        <!--结束-->

                        <td>
                            <a href="/GQT/public/admin/index/delete?id={$vo.stu_id}">
                                <img src='$gqt/admin/image/delete.png'>
                            </a>
                        </td>

                    </tr>
                    {/volist}

                    </tbody>

            </table>

        </div>
        <div style="float: right;">{$list->render}
        </div>
    </div>
</body>
</html>